$('document').ready(function(){		
	$('#frmAdd').validate({
            errorClass      : 'error',
            errorElement	: 'span',
    		onfocusout		: false,
    		onkeyup			: false,
    		ignore			: 'input[type="text"]:hidden',
			rules:{
				code:{
					required:true,
                },
				name:{
					required: true
				}
			},
			messages:{
				code:{
					required:code_length
                },
				name:{
					required: name_required
				}
			},
			errorPlacement: function(error, element) {
			       error.insertAfter(element); // change this to place error message elsewhere
			}			
	});    
});

